package models

import "gorm.io/gorm"

type SeckillVoucher struct {
	gorm.Model
	VoucherId int    `gorm:"column:voucher_id;primary_key;" json:"voucherId"`
	Stock     int    `gorm:"column:stock" json:"stock"`
	BeginTime MyTime `gorm:"column:begin_time" json:"beginTime"`
	EndTime   MyTime `gorm:"column:end_time" json:"endTime"`
}
type SeckillVoucherVo struct {
	gorm.Model
	VoucherId  int    `gorm:"column:voucher_id;primary_key" json:"voucherId"`
	Stock      int    `gorm:"column:stock" json:"stock"`
	CreateTime MyTime `gorm:"column:created_at" json:"createTime"`
	BeginTime  MyTime `gorm:"column:begin_time" json:"beginTime"`
	EndTime    MyTime `gorm:"column:end_time" json:"endTime"`
	UpdateTime MyTime `gorm:"column:updated_at" json:"updateTime"`
}

func (SeckillVoucher) TableName() string {
	return "tb_seckill_voucher"
}
func (SeckillVoucherVo) TableName() string {
	return "tb_seckill_voucher"
}
